<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

</body>
<script>
  var str;
  console.log(str); // => undefined

  var str2 = undefined;
  console.log(str2 + "aaa"); // => undefinedaaa
  console.log(str2 + 1); // => NaN
  console.log(str2 + true); // => NaN

  var str3 = null;
  console.log(str3 + "aaa"); // => nullaaa
  console.log(str3 + 1); // => 1
  console.log(str3 + true); // => 1
</script>
</html>